import type { spotItem } from '@/types/eat'
import { defineStore } from 'pinia'
import { ref } from 'vue'

export const usePagesMachineIdStore = defineStore('pagesMachineId', () => {
  /**
   * * 分享的设备id
   */
  const pagesMachineId = ref<string>()
  /**
   * * 保存分享的设备id
   * @param val
   */
  const setPagesMachineId = (val: string) => {
    pagesMachineId.value = val
  }

  /**
   * * 清理分享的设备id
   */
  const clearPagesMachineId = () => {
    pagesMachineId.value = undefined
  }
  return {
    pagesMachineId,
    setPagesMachineId,
    clearPagesMachineId,
  }
})
